﻿package mortal.game.view.daily.view
{
    import Message.DB.Tables.*;
    import com.mui.controls.*;
    import extend.language.*;
    import mortal.common.global.*;
    import mortal.game.resource.*;
    import mortal.game.view.common.*;
    import mortal.game.view.daily.*;

    public class DailyActivityShowView extends DailyShowBaseView
    {
        private var _time:GTextFiled;
        private var _intr:GTextFiled;
        private static var _instance:DailyActivityShowView;

        public function DailyActivityShowView()
        {
            return;
        }// end function

        override public function set data(param1:TDailyViewConfig) : void
        {
            super.data = param1;
            this._time.text = _data.normalOpenDt == "\"\"" ? ("" + Language.getString(71041)) : (DailyUtil.getTimeStr(_data.normalOpenDt, false));
            this._intr.text = "         " + _data.description;
            return;
        }// end function

        override protected function createDisposedChildrenImpl() : void
        {
            super.createDisposedChildrenImpl();
            pushUIToDisposeVec(UIFactory.gTextField(Language.getString(70450), 5, 185, 220, 20, this, GlobalStyle.textFormatAnHuan));
            pushUIToDisposeVec(UIFactory.gTextField(Language.getString(70451), 5, 205, 220, 20, this, GlobalStyle.textFormatAnHuan));
            this._time = UIFactory.gTextField("", 65, 185, 200, 20, this);
            this._intr = UIFactory.gTextField("", 5, 205, 210, 80, this);
            this._intr.wordWrap = true;
            this._intr.multiline = true;
            this.bgUrl = ImagesConst.DailyActivitBg;
            return;
        }// end function

        override protected function disposeImpl(param1:Boolean = true) : void
        {
            super.disposeImpl(param1);
            this._time.dispose(param1);
            this._intr.dispose(param1);
            return;
        }// end function

        public static function get instance() : DailyActivityShowView
        {
            if (!_instance)
            {
                _instance = new DailyActivityShowView;
            }
            return _instance;
        }// end function

        public static function get hasInstance() : Boolean
        {
            return _instance != null;
        }// end function

    }
}
